package com.eastfair.transport.service.impl;

//import com.baomidou.dynamic.datasource.annotation.DS;
import com.eastfair.core.base.R;
import com.eastfair.core.exception.BizException;
import com.eastfair.transport.service.TransportServiceItemService;
import com.eastfair.venuebooking.api.ServiceItemFeign;
import com.eastfair.venueservice.dto.ServiceItemQuery;
import com.eastfair.venueservice.vo.ServiceItemVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* <p>
    * 业务实现类
    * 服务项
    * </p>
*
* @author linan
* @date 2022-08-01
*/
@Slf4j
@Service
//@DS("#thread.tenant")
public class TransportServiceItemServiceImpl implements TransportServiceItemService {

    @Resource
    private ServiceItemFeign serviceItemFeign;

    @Override
    public List<ServiceItemVO> queryServiceItemOfTransport(ServiceItemQuery serviceItemQuery) {
        R<List<ServiceItemVO>> listR = serviceItemFeign.queryServiceItemOfTransport(serviceItemQuery);
        if(!listR.getIsSuccess()){
            throw BizException.wrap(listR.getCode(),listR.getMsg());
        }
        return listR.getData();
    }
}
